﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FieldDevice.UI
{
    public partial class CurrentBarForm : DeviceFormBase
    {
        public CurrentBarForm()
        {
            InitializeComponent();
        }
        private void CurrentBarForm_SizeChanged(object sender, EventArgs e)
        {
            this.Refresh();
        }

        public override void UpdateReads()
        {
            this.currentColumn.UpdateReads();
        }

        private void CurrentBarForm_Load(object sender, EventArgs e)
        {
            this.currentColumn.Device1P1 = DeviceManager.GlobalDeviceManager.GetDevice("1P1");
            this.currentColumn.Device2P1 = DeviceManager.GlobalDeviceManager.GetDevice("2P1");
            this.currentColumn.Device1P11 = DeviceManager.GlobalDeviceManager.GetDevice("1P11");
            DeviceManager.GlobalDeviceManager.UIManager.CurrentBar = this;//.Add(this);
        }

        private void CurrentBarForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            DeviceManager.GlobalDeviceManager.UIManager.CurrentBar = null;//.Remove(this);
        }
    }
}
